package main

import (
	"fmt"
	"os"
)

// LogPrintf 记录日志信息
func LogPrintf(loglevel int, format string, a ...interface{}) (n int, err error) {
	if g_args.Log >= loglevel {
		return fmt.Fprintf(os.Stderr, format, a...)
	}
	return 0, nil
}

// LogPrintln 记录日志信息
func LogPrintln(loglevel int, a ...interface{}) (n int, err error) {
	if g_args.Log >= loglevel {
		return fmt.Fprintln(os.Stderr, a...)
	}
	return 0, nil
}
